package com.itheima.job;

import java.util.LinkedHashMap;

public class Test04 {
    public static void main(String[] args) {
        LinkedHashMap<Integer,Student> lhm =new LinkedHashMap<>();
        Student stu1 = new Student(001,"zs",70.0);
        Student stu2 = new Student(002,"ls",90.0);
        Student stu3 = new Student(002,"ww",75.0);

        lhm.put(stu1.getNum(),stu1);
        lhm.put(stu2.getNum(),stu2);
        lhm.put(stu3.getNum(),stu3);

        System.out.println(lhm);

    }
}
class Student{
    private int num;//学号
    private String name;//姓名
    private double score;//分数
    public int getNum() {
        return num;
    }
    public void setNum(int num) {
        this.num = num;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public double getScore() {
        return score;
    }
    public void setScore(double score) {
        this.score = score;
    }
    public Student(int num, String name, double score) {
        super();
        this.num = num;
        this.name = name;
        this.score = score;
    }
    public Student() {}
    public String toString() {
        return "Student [num=" + num + ", name=" + name + ", score=" + score + "]";
    }
}